home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / driverkit / IOFrameBufferDisplay.h < prev    next >
Text File  |  1994-04-05  |  3KB  |  103 lines

  1. /*     Copyright (c) 1992 NeXT Computer, Inc.  All rights reserved. 
  2.  *
  3.  * IOFrameBufferDisplay.h - Standard frame buffer display driver class.
  4.  *
  5.  *
  6.  * HISTORY
  7.  * 01 Sep 92    Joe Pasqua
  8.  *      Created. 
  9.  */
  10.  
  11. /* Notes:
  12.  * This module defines an abstract superclass for "standard" (linear)
  13.  * framebuffers.
  14.  */
  15.  
  16. #ifndef __IOFRAMEBUFFERDISPLAY_H__
  17. #define __IOFRAMEBUFFERDISPLAY_H__
  18.  
  19. #import <driverkit/IODisplay.h>
  20.  
  21. @interface IOFrameBufferDisplay:IODisplay
  22. {
  23. @private
  24.     void *priv;
  25.     /* Mapping tables used in cursor drawing to 5-5-5 displays. */
  26.     unsigned char *_bm34To35SampleTable;
  27.     unsigned char *_bm35To34SampleTable;
  28.  
  29.     /* Mapping tables used in cursor drawing to 8-bit RGB displays. */
  30.     unsigned int *_bm256To38SampleTable;
  31.     unsigned char *_bm38To256SampleTable;
  32.  
  33.     /* Reserved for future expansion. */
  34.     int _IOFrameBufferDisplay_reserved[6];
  35. }
  36.  
  37. /* Put the display into linear framebuffer mode. This typically happens
  38.  * when the window server starts running. This method is implemented by
  39.  * subclasses in a device specific way.
  40.  */
  41. - (void)enterLinearMode;
  42.  
  43. /* Get the device out of whatever advanced linear mode it was using and back
  44.  * into a state where it can be used as a standard VGA device. This method
  45.  * is implemented by subclasses in a device specific way.
  46.  */
  47. - (void)revertToVGAMode;
  48.  
  49. /* Look up the physical memory location for this device instance and map
  50.  * it into VM for use by the device driver. If problems occur, the method
  51.  * returns (vm_address_t)0. If `addr' is not 0, then it is used as the
  52.  * physical memory address and `length' is used as the length.
  53.  */
  54. - (vm_address_t)mapFrameBufferAtPhysicalAddress:(unsigned int)addr
  55.      length:(int)length;
  56.  
  57. /* Choose a mode from the list `modeList' (containing `count' modes) based
  58.  * on the value of the `DisplayMode' key in the device's config table.  If
  59.  * `isValid' is nonzero, each element specifies whether or not the
  60.  * corresponding mode is valid.
  61.  */
  62. - (int)selectMode:(const IODisplayInfo *)modeList count:(int)count
  63.     valid:(const BOOL *)isValid;
  64.  
  65. /* Equivalent to the above with `isValid' set to zero.
  66.  */
  67. - (int)selectMode:(const IODisplayInfo *)modeList count:(int)count;
  68.  
  69. /* IODevice methods reimplemented by this class. */
  70.  
  71. + (BOOL)probe:deviceDescription;
  72.  
  73. - initFromDeviceDescription:deviceDescription;
  74.  
  75. - (IOReturn)getIntValues        : (unsigned *)parameterArray
  76.                forParameter : (IOParameterName)parameterName
  77.                       count : (unsigned *)count;    // in/out
  78.  
  79. - (IOReturn)setIntValues        : (unsigned *)parameterArray
  80.                forParameter : (IOParameterName)parameterName
  81.                       count : (unsigned)count;
  82.  
  83. - (IOReturn)setCharValues        : (unsigned char *)parameterArray
  84.                forParameter : (IOParameterName)parameterName
  85.                       count : (unsigned)count;
  86.  
  87. - setTransferTable:(const unsigned int *)table count:(int)count;
  88.  
  89. /* 'IOScreenEvents' protocol methods reimplemented by this class. */
  90.  
  91. - hideCursor: (int)token;
  92.  
  93. - moveCursor:(Point*)cursorLoc frame:(int)frame token:(int)t;
  94.  
  95. - showCursor:(Point*)cursorLoc frame:(int)frame token:(int)t;
  96.  
  97. /* NOTE: Subclasses must override setBrightness and implement appropriately. */
  98. - setBrightness:(int)level token:(int)t;
  99.  
  100. @end
  101.  
  102. #endif    /* __IOFRAMEBUFFERDISPLAY_H__ */
  103.